package pers.baiban.sqltoword.handler;

import cn.hutool.core.util.ObjectUtil;
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STBorder;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STVerticalJc;

import java.math.BigInteger;

/**
 * 表格边框辅助处理器接口
 *
 * @author 强子初
 * @since 2023/11/29
 */
public interface TableProcessor extends GenProcessor {

    /**
     * 获取 CTTblBorders
     */
    default CTTblBorders getCTTblBorders(XWPFTable table) {
        CTTblPr pr = table.getCTTbl().getTblPr();
        return pr.isSetTblBorders() ? pr.getTblBorders() : pr.addNewTblBorders();
    }
}